
#import <Foundation/Foundation.h>
#import "AFNetworking.h"

typedef void(^ProgressBlock) (NSProgress *progress);
typedef void(^SucessBlock) (id responseObject);
typedef void(^FailBlock) (NSInteger ErrorCode,NSError * ErrorString);



@interface HelenParametersDic:NSMutableDictionary

+(id)h_dictionary;

@end



@interface HelenFormData : NSObject
/**文件数据*/
@property (nonatomic, strong) NSData *data;
/**文件路径*/
@property (nonatomic, copy) NSString *filepath;
/** 参数名*/
@property (nonatomic, copy) NSString *paramName;
/**文件名*/
@property (nonatomic, copy) NSString *filename;
/**文件类型*/
@property (nonatomic, copy) NSString *mimeType;

@end



@interface HelenHttpClient : NSObject

/**发送一个请求(不上传文件数据)*/
+ (void)requestWithUrlString:(NSString *)urlString andParam:(NSMutableDictionary *)param andMethod:(NSString *)method progress:(ProgressBlock)progressBlock success:(SucessBlock)sucessBlock andFailBlock:(FailBlock)failBolck;

/**发送一个请求(不上传文件数据) json格式参数*/
+ (void)json_requestWithUrlString:(NSString *)urlString andParam:(NSMutableDictionary *)param andMethod:(NSString *)method progress:(ProgressBlock)progressBlock success:(SucessBlock)sucessBlock andFailBlock:(FailBlock)failBolck;


/**发送一个POST请求(上传文件数据)*/
+ (void)postWithURL:(NSString *)url params:(NSDictionary *)params formDataArray:(NSArray *)formDataArray progress:(ProgressBlock)progressBlock success:(SucessBlock)sucessBlock failure:(FailBlock)failureBlock;



/**发送一请求(下载文件数据)*/
+ (void)downLoadTaskWithURL:(NSString *)url progress:(ProgressBlock)progressBlock;

@end

